package team.pwy.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import team.pwy.mapper.SessionMapper;
import team.pwy.pojo.entity.Session;

import java.util.List;

@Service
@Transactional
public class SessionServiceImpl implements SessionService{
    @Autowired
    private SessionMapper sessionMapper;
    @Override
    public Session findBySessionId(Integer id) {
        return sessionMapper.findBySessionId(id);
    }

    @Override
    public List<Session> findByMovieId(Integer movieId,String time) {
        return sessionMapper.findByMovieId(movieId,time);
    }

    @Override
    public Integer updateById(Integer id,Integer quota) {
        return sessionMapper.updateById(id,quota);
    }

    @Override
    public List<Session> findByMovieIdDesc(Integer movieId) {
        return sessionMapper.findByMovieIdDesc(movieId);
    }

//    @Override
//    public Session findByHallId(Integer hallId) {
//        return sessionMapper.findByHallId(hallId);
//    }
}
